import numpy as np


def gen_golden_data_spectral_magnitude2_d():
    dtype = np.complex64
    input_shape = [2048,4]
    output_shape = [2048,4]

    
    x =  np.random.uniform(-10000, 10000, input_shape).astype(np.float32)+1j* np.random.uniform(-10000, 10000, input_shape).astype(np.float32)
    print(x)

    golden = (abs(x)).astype(np.float32)

    x.tofile("./input/input_x.bin")
    golden.tofile("./output/golden.bin")

    
    tiling = np.array([2048*4, 8], dtype=np.uint32)
    tiling.tofile("./input/input_tiling.bin")
    
    # 只需要一个输入文件
    x.tofile("./input/input_x.bin")
    
    # 保存计算结果
    golden.tofile("./output/golden.bin")


if __name__ == "__main__":
    gen_golden_data_spectral_magnitude2_d()
